package com.KA.controller;


import com.KA.common.R;
import com.KA.dto.CheackWalletVo;
import com.KA.entity.WalletLog;
import com.KA.service.WalletLogService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/walletLog")
@Api(tags = "钱包日志")
public class UserWalletLogController {

    @Autowired
    private WalletLogService walletLogService;

    @ApiOperation(value = "查看钱包明细日志")
    @PostMapping("cheack")
    public R cheack(@RequestBody CheackWalletVo cheackWalletVo ){
       return R.success(walletLogService.list(new LambdaQueryWrapper<WalletLog>()
               .eq(WalletLog::getUser_wallet_id,cheackWalletVo.getWalletId())));
   }


}
